home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / os2 / pccts.zip / CHARPTR.C < prev    next >
C/C++ Source or Header  |  1992-12-08  |  2KB  |  50 lines

  1. /*
  2.  * SOFTWARE RIGHTS
  3.  *
  4.  * We reserve no LEGAL rights to the Purdue Compiler Construction Tool
  5.  * Set (PCCTS) -- PCCTS is in the public domain.  An individual or
  6.  * company may do whatever they wish with source code distributed with
  7.  * PCCTS or the code generated by PCCTS, including the incorporation of
  8.  * PCCTS, or its output, into commerical software.
  9.  * 
  10.  * We encourage users to develop software with PCCTS.  However, we do ask
  11.  * that credit is given to us for developing PCCTS.  By "credit",
  12.  * we mean that if you incorporate our source code into one of your
  13.  * programs (commercial product, research project, or otherwise) that you
  14.  * acknowledge this fact somewhere in the documentation, research report,
  15.  * etc...  If you like PCCTS and have developed a nice tool with the
  16.  * output, please mention that you developed it using PCCTS.  In
  17.  * addition, we ask that this header remain intact in our source code.
  18.  * As long as these guidelines are kept, we expect to continue enhancing
  19.  * this system and expect to make other tools available as they are
  20.  * completed.
  21.  *
  22.  * ANTLR 1.06
  23.  * Terence Parr
  24.  * Purdue University
  25.  * 1989-1992
  26.  */
  27. #ifdef __STDC__
  28. char *malloc(unsigned);
  29. int strlen(char *);
  30. void strcpy(char *, char *);
  31. #else
  32. char *malloc();
  33. int strlen();
  34. void strcpy();
  35. #endif
  36.  
  37. #ifdef __STDC__
  38. zzcr_attr(Attrib *a,int token,char *text)
  39. #else
  40. zzcr_attr(a,token,text)
  41. Attrib *a;
  42. int token;
  43. char *text;
  44. #endif
  45. {
  46.     *a = malloc(strlen(text)+1);
  47.     if ( *a == NULL ) {fprintf(stderr, "zzcr_attr: out of memory!\n"); exit(-1);}
  48.     strcpy(*a, text);
  49. }
  50.